package com.smartboot.plus.enums;


public enum BrokerStatueEnum {

	RUNNING("running", "运行中"),
	STOPPED("stopped", "已停止"),
	UNHEALTHY("unhealthy", "不健康"),
	UNKNOWN("unknown", "未知");

	private String desc;

	private String code;

	BrokerStatueEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public static BrokerStatueEnum getByCode(String code) {
		for (BrokerStatueEnum statueEnum : values()) {
			if (statueEnum.code.equals(code))
				return statueEnum;
		}
		return UNKNOWN;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return this.desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
